<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');


    // 商品管理
    $router->get('/good/index', 'GoodController@index');
    $router->get('/good/getGoodList', 'GoodController@getGoodList');
    $router->post('/good/setPrice', 'GoodController@setPrice');
    $router->post('/good/setRemark', 'GoodController@setRemark');
    $router->post('/good/delete', 'GoodController@delete');
    $router->post('/good/stock', 'GoodController@stock');


    $router->get('/good/ImportAsin', 'GoodController@ImportAsin');
    $router->get('/good/exportGood', 'GoodController@exportGood');
    $router->get('/amazon/sync', 'GoodController@syncMws');

    // 库存管理
    $router->get('/stock/doExport', 'StockController@doExport');
    $router->get('/stock/export', 'StockController@export');

    $router->get('/stock/index', 'StockController@index');
    $router->get('/stock/record', 'StockController@record');

    $router->get('/stock/getRecord', 'StockController@getRecord');


    $router->get('/stock/record/import', 'StockController@recordImport');


    // 收货地址管理
    $router->get('/address/index', 'AddressController@index');
    $router->post('/address/save', 'AddressController@save');

    // 相册管理
    $router->get('/album/index', 'AlbumController@index');
    $router->post('/album/save', 'AlbumController@save');

    // 订货管理
    $router->get('/purchase/index', 'PurchaseOrderController@index');
    $router->get('/purchase/import', 'PurchaseOrderController@import');
    $router->get('/purchase/export', 'PurchaseOrderController@export');

});
